import List from '@/pages/dnd/right/list';
import DcDrop from '@/pages/dnd/right/DcDrop';
import { Item } from '@/pages/dnd/dnd';
import Components from '@/pages/dnd/right/components';
import React from 'react';

export interface RightProps {
  data: Item;
  move: (data: any, data1: any) => void;
}

export default function Right(props: RightProps) {
  const { data, move } = props;
  const CurrentComponent: any = (Components as any)[data.type];

  return <CurrentComponent data={data} move={move} />;
}
